<template>
	<div class="v-c-page">
		<div v-if="showList" class="v-c-nav">
      <div class="d-flex d-flex-between d-flex-middle px20 mb15 mt20">
        <div class="d-flex d-flex-milddle pr10">
          <div class="mr10">
            <a-input placeholder="请输入角色名称" allowClear />
          </div>
          <a-button type="primary" class="radius6">查询</a-button>
        </div>
        <a-button type="primary" class="radius6" @click="toEdite">新增</a-button>
      </div>
      <div class="table-wrapper pb30">
        <a-table
          rowKey="menuId"
          :columns="columns"
          :pagination="false"
          :scroll="{ x: '1000px'}"
          tableLayout="auto"
          :loading="tableLoading"
          :data-source="tableData"
          :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
        >
          <template v-slot:bodyCell="{column,record,index}">
            <template v-if="column.dataIndex === 'operate'">
              <button class="ant-btn ant-btn-primary is-plain sm mr10"><span>编辑</span></button>
              <a-popconfirm
                title="确定禁用该用户？"
                ok-text="禁用"
                cancel-text="取消"
              >
                <button class="ant-btn ant-btn-danger is-plain sm"><span>删除</span></button>
              </a-popconfirm>
            </template>
          </template>
        </a-table>
      </div>
    </div>
    <div class="p30" v-else>
      <div class="d-flex d-flex-between mb30">
        <div class="d-flex d-flex-middle color-000 cursor" @click="editeBack">
          <svg class="icon" style="width: 1.3em;height: 1.3em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1718"><path d="M631.04 161.941333a42.666667 42.666667 0 0 1 63.061333 57.386667l-2.474666 2.730667-289.962667 292.245333 289.706667 287.402667a42.666667 42.666667 0 0 1 2.730666 57.6l-2.474666 2.752a42.666667 42.666667 0 0 1-57.6 2.709333l-2.752-2.474667-320-317.44a42.666667 42.666667 0 0 1-2.709334-57.6l2.474667-2.752 320-322.56z" fill="#111111" p-id="1719"></path></svg>
          <span>返回</span>
        </div>
      </div>
      <div class="save">
        <div class="sec d-flex d-flex-middle">
          <span class="label rep-lbl">菜单类型</span>
          <a-radio-group v-model:value="form.menuType" button-style="solid">
            <a-radio-button :value="1">目录</a-radio-button>
            <a-radio-button :value="2">菜单</a-radio-button>
            <a-radio-button :value="3">按钮</a-radio-button>
          </a-radio-group>
        </div>
        <div v-if="form.menuType == 1">
            <div class="sec d-flex d-flex-middle">
              <span class="label rep-lbl">上级目录</span>
                <a-tree-select
                    v-model:value="treeValue"
                    :treeData="treeData"
                    :fieldNames="{ label: 'menuName', key: 'menuId', value: 'menuId' }"
                    show-search
                    style="width:300px;"
                    :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                    placeholder="请选择菜单"
                    allow-clear
                    tree-default-expand-all
                    treeNodeFilterProp="menuName"
                    @change="treeSelectChange"
                />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">菜单名称</span>
                <a-input placeholder="请输入菜单名称"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">菜单图标</span>
                <a-input placeholder="请输入菜单图标"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">显示状态</span>
                <a-switch v-model:checked="visibleFlag" checked-children="显示" un-checked-children="不显示" size="default" />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">禁用状态</span>
                <a-switch v-model:checked="disabledFlag" checked-children="启用" un-checked-children="禁用" size="default" />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">排序</span>
                <div class="d-flex d-flex-middle">
                    <a-input placeholder="请输入排序号" type="number" style="width:150px"></a-input>
                    <div class="color-999 font12 ml10">提示：值越小越靠前</div>
                </div>
            </div>
        </div>
        
        <div v-else-if="form.menuType == 2">
            <div class="sec d-flex d-flex-middle">
              <span class="label rep-lbl">上级目录</span>
                <a-tree-select
                    v-model:value="treeValue"
                    :treeData="treeData"
                    :fieldNames="{ label: 'menuName', key: 'menuId', value: 'menuId' }"
                    show-search
                    style="width:300px;"
                    :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                    placeholder="请选择菜单"
                    allow-clear
                    tree-default-expand-all
                    treeNodeFilterProp="menuName"
                    @change="treeSelectChange"
                />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">菜单图标</span>
                <a-input placeholder="请输入菜单图标"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">菜单图标</span>
                <a-input placeholder="请输入菜单图标"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">路由地址</span>
                <a-input placeholder="请输入路由地址"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">组件地址</span>
                <a-input placeholder="请输入组件地址"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">是否缓存</span>
                <a-switch v-model:checked="visibleFlag" checked-children="开启缓存" un-checked-children="不缓存" size="default" />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">是否外链</span>
                <a-switch v-model:checked="visibleFlag" checked-children="是外链" un-checked-children="不是外链" size="default" />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">显示状态</span>
                <a-switch v-model:checked="visibleFlag" checked-children="显示" un-checked-children="不显示" size="default" />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">禁用状态</span>
                <a-switch v-model:checked="visibleFlag" checked-children="启用" un-checked-children="禁用" size="default" />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">排序</span>
                <div class="d-flex d-flex-middle">
                    <a-input placeholder="请输入排序号" type="number" style="width:150px"></a-input>
                    <div class="color-999 font12 ml10">提示：值越小越靠前</div>
                </div>
            </div>
        </div>

        <div v-else>
            <div class="sec d-flex d-flex-middle">
              <span class="label rep-lbl">上级目录</span>
                <a-tree-select
                    v-model:value="treeValue"
                    :treeData="treeData"
                    :fieldNames="{ label: 'menuName', key: 'menuId', value: 'menuId' }"
                    show-search
                    style="width:300px;"
                    :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                    placeholder="请选择菜单"
                    allow-clear
                    tree-default-expand-all
                    treeNodeFilterProp="menuName"
                    @change="treeSelectChange"
                />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">功能点名称</span>
                <a-input placeholder="请输入功能点名称"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label">功能点关联菜单</span>
                <a-input placeholder="请输入功能点关联菜单"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">功能点状态</span>
                <a-switch v-model:checked="visibleFlag" checked-children="启用" un-checked-children="禁用" size="default" />
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">权限类型</span>
                <a-radio-group v-model:value="form.permsType" >
                    <a-radio v-for="item in menuPerms" :key="item.value" :value="item.value">{{ item.desc }}</a-radio>
                </a-radio-group>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">前端权限</span>
                <a-input placeholder="请输入前端权限"></a-input>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">后端权限</span>
                <div>
                    <a-input placeholder="请输入后端权限"></a-input>
                    <div class="font12 color-999 mt5">后端权限</div>
                </div>
            </div>
            <div class="sec d-flex d-flex-middle">
                <span class="label rep-lbl">排序</span>
                <div class="d-flex d-flex-middle">
                    <a-input placeholder="请输入排序号" type="number" style="width:150px"></a-input>
                    <div class="color-999 font12 ml10">提示：值越小越靠前</div>
                </div>
            </div>
        </div>
        <div class="sec d-flex a-center">
          <span class="label"></span>
          <div>
            <a-button class="mr10" type="primary" size="default" style="width:100px;height:36px">保存</a-button>
            <a-button type="primary" size="default" style="width:auto;height:36px;padding-left:10px;padding-right:10px">提交并添加下一个</a-button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { reactive,ref,onMounted,computed } from 'vue';
// import { tool } from '@/api/common/common';
import { message } from 'ant-design-vue';
import { spinLoading } from '@/components/spin-loading';
let btnStatus = ref(false);
let modalVisible = ref(false)
let showList= ref(true)
let visibleFlag = ref(true)
let disabledFlag = ref(false)
const selectedRowKeys = ref([]);
let selectedRows = [];
function onSelectChange(keyArray, selectRows) {
  selectedRowKeys.value = keyArray;
  selectedRows = selectRows;
}
let menuPerms = ref([
    {
        value:1,
        desc:'Sa-Token模式'
    }
])
// ------------------------- 分类列表 ---------------------------
const columns = reactive([
  {
    align:'left',
		title: '名称',
    dataIndex: 'menuName',
  },{
    align:'left',
		title: '类型',
    dataIndex: 'menuType',
  },{
    align:'left',
    title: '图标',
    dataIndex: 'icon',
  },{
    align:'left',
    title: '路径',
    dataIndex: 'path',
  },{
    title: '组件',
    dataIndex: 'component',
    align:'left',
  },{
    align:'left',
    title: '后端权限',
    dataIndex: 'apiPerms',
    ellipsis: true,
  },{
    align:'left',
    title: '前端权限',
    dataIndex: 'webPerms',
    ellipsis: true,
  },{
    align:'left',
		title: '操作',
		dataIndex: 'operate',
	}
]);
// -----------------------------------------
const formDefault = {
    id:'',
    parentId:0,
    menuType:1,
    departmentName:'',
    permsType:1
}
let form = reactive({ ...formDefault})
// -----------------------------------------
function toEdite(){
  showList.value = false
}
function editeBack(){
  showList.value = true
}
//------------------------------------------
// -------------------------------------------
let treeData = ref([]);
let treeValue = ref<string>()
function treeSelectChange(e) {
    treeValue.value = e
}
treeData.value = [
    {
        "menuName": "OA系统",
        "menuType": 1,
        "parentId": 0,
        "sort": 1,
        "path": null,
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "BankOutlined",
        "contextMenuId": null,
        "menuId": 138,
        "createTime": "2022-06-24 20:09:18",
        "createUserId": 1,
        "updateTime": "2022-10-22 18:30:15",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "企业详情",
                "menuType": 2,
                "parentId": 138,
                "sort": null,
                "path": "/oa/enterprise/enterprise-detail",
                "component": "/business/oa/enterprise/enterprise-detail.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": false,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": null,
                "contextMenuId": null,
                "menuId": 145,
                "createTime": "2022-09-14 18:52:52",
                "createUserId": 1,
                "updateTime": "2022-11-22 10:39:07",
                "updateUserId": 1,
            },
            {
                "menuName": "企业信息",
                "menuType": 2,
                "parentId": 138,
                "sort": 1,
                "path": "/oa/enterprise/enterprise-list",
                "component": "/business/oa/enterprise/enterprise-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "ShopOutlined",
                "contextMenuId": null,
                "menuId": 144,
                "createTime": "2022-09-14 17:00:07",
                "createUserId": 1,
                "updateTime": "2023-12-04 13:42:19",
                "updateUserId": 1,
            },
            {
                "menuName": "通知公告",
                "menuType": 2,
                "parentId": 138,
                "sort": 2,
                "path": "/oa/notice/notice-list",
                "component": "/business/oa/notice/notice-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "SoundOutlined",
                "contextMenuId": null,
                "menuId": 132,
                "createTime": "2022-06-24 18:23:09",
                "createUserId": 1,
                "updateTime": "2023-12-04 13:42:23",
                "updateUserId": 1,
                "children": [
                    {
                        "menuName": "我的通知",
                        "menuType": 2,
                        "parentId": 132,
                        "sort": null,
                        "path": "/oa/notice/notice-employee-list",
                        "component": "/business/oa/notice/notice-employee-list.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": false,
                        "visibleFlag": false,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": null,
                        "contextMenuId": null,
                        "menuId": 149,
                        "createTime": "2022-09-14 20:29:41",
                        "createUserId": 1,
                        "updateTime": "2022-09-14 20:31:23",
                        "updateUserId": 1,
                        "children": []
                    },
                    {
                        "menuName": "我的通知公告详情",
                        "menuType": 2,
                        "parentId": 132,
                        "sort": null,
                        "path": "/oa/notice/notice-employee-detail",
                        "component": "/business/oa/notice/notice-employee-detail.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": false,
                        "visibleFlag": false,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": null,
                        "contextMenuId": null,
                        "menuId": 150,
                        "createTime": "2022-09-14 20:30:25",
                        "createUserId": 1,
                        "updateTime": "2022-09-14 20:31:38",
                        "updateUserId": 1,
                        "children": []
                    },
                    {
                        "menuName": "公告详情",
                        "menuType": 2,
                        "parentId": 132,
                        "sort": null,
                        "path": "/oa/notice/notice-detail",
                        "component": "/business/oa/notice/notice-detail.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": false,
                        "visibleFlag": false,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": null,
                        "contextMenuId": null,
                        "menuId": 142,
                        "createTime": "2022-06-25 16:38:47",
                        "createUserId": 1,
                        "updateTime": "2022-09-14 19:46:17",
                        "updateUserId": 1,
                        "children": []
                    }
                ]
            }
        ]
    },
    {
        "menuName": "进销存系统",
        "menuType": 1,
        "parentId": 0,
        "sort": 2,
        "path": null,
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "AccountBookOutlined",
        "contextMenuId": null,
        "menuId": 137,
        "createTime": "2022-06-24 20:07:20",
        "createUserId": 1,
        "updateTime": "2022-10-22 18:30:19",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "商品管理",
                "menuType": 1,
                "parentId": 137,
                "sort": 10,
                "path": "/goods",
                "component": null,
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "BarcodeOutlined",
                "contextMenuId": null,
                "menuId": 48,
                "createTime": "2021-08-12 18:02:59",
                "createUserId": 1,
                "updateTime": "2022-06-24 20:07:35",
                "updateUserId": 1,
                "children": [
                    {
                        "menuName": "商品管理",
                        "menuType": 2,
                        "parentId": 48,
                        "sort": 1,
                        "path": "/erp/goods/list",
                        "component": "/business/erp/goods/goods-list.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": true,
                        "visibleFlag": true,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": "AliwangwangOutlined",
                        "contextMenuId": null,
                        "menuId": 47,
                        "createTime": "2021-08-12 17:58:39",
                        "createUserId": 1,
                        "updateTime": "2023-12-01 19:33:08",
                        "updateUserId": 1,
                        "children": []
                    },
                    {
                        "menuName": "商品分类",
                        "menuType": 2,
                        "parentId": 48,
                        "sort": 2,
                        "path": "/erp/catalog/goods",
                        "component": "/business/erp/catalog/goods-catalog.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": true,
                        "visibleFlag": true,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": "ApartmentOutlined",
                        "contextMenuId": null,
                        "menuId": 78,
                        "createTime": "2022-05-18 23:34:14",
                        "createUserId": 1,
                        "updateTime": "2023-12-01 19:33:13",
                        "updateUserId": 1,
                        "children": []
                    },
                    {
                        "menuName": "自定义分组",
                        "menuType": 2,
                        "parentId": 48,
                        "sort": 3,
                        "path": "/erp/catalog/custom",
                        "component": "/business/erp/catalog/custom-catalog.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": false,
                        "visibleFlag": true,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": "AppstoreAddOutlined",
                        "contextMenuId": null,
                        "menuId": 79,
                        "createTime": "2022-05-18 23:37:53",
                        "createUserId": 1,
                        "updateTime": "2023-12-01 19:33:16",
                        "updateUserId": 1,
                        "children": []
                    }
                ]
            }
        ]
    },
    {
        "menuName": "部门员工",
        "menuType": 1,
        "parentId": 0,
        "sort": 3,
        "path": "/organization",
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "UserSwitchOutlined",
        "contextMenuId": null,
        "menuId": 45,
        "createTime": "2021-08-12 16:13:27",
        "createUserId": 1,
        "updateTime": "2023-11-28 17:42:25",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "部门员工",
                "menuType": 2,
                "parentId": 45,
                "sort": 1,
                "path": "/employee/department",
                "component": "/system/employee/department/index.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "AuditOutlined",
                "contextMenuId": null,
                "menuId": 46,
                "createTime": "2021-08-12 16:21:50",
                "createUserId": 1,
                "updateTime": "2022-06-23 16:19:54",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "角色管理",
                "menuType": 2,
                "parentId": 45,
                "sort": 2,
                "path": "/employee/role",
                "component": "/system/employee/role/index.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "SlidersOutlined",
                "contextMenuId": null,
                "menuId": 76,
                "createTime": "2021-08-26 10:31:00",
                "createUserId": 1,
                "updateTime": "2022-06-23 16:21:06",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "文档中心",
        "menuType": 1,
        "parentId": 0,
        "sort": 4,
        "path": null,
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": true,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": 1,
        "webPerms": null,
        "apiPerms": null,
        "icon": "FileSearchOutlined",
        "contextMenuId": null,
        "menuId": 218,
        "createTime": "2023-12-01 19:37:28",
        "createUserId": 1,
        "updateTime": "2023-12-01 19:37:51",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "帮助文档",
                "menuType": 2,
                "parentId": 218,
                "sort": 1,
                "path": "/help-doc/help-doc-manage-list",
                "component": "/support/help-doc/management/help-doc-manage-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "FolderViewOutlined",
                "contextMenuId": null,
                "menuId": 147,
                "createTime": "2022-09-14 19:59:01",
                "createUserId": 1,
                "updateTime": "2023-12-01 19:38:23",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "意见反馈",
                "menuType": 2,
                "parentId": 218,
                "sort": 2,
                "path": "/feedback/feedback-list",
                "component": "/support/feedback/feedback-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "CoffeeOutlined",
                "contextMenuId": null,
                "menuId": 148,
                "createTime": "2022-09-14 19:59:52",
                "createUserId": 1,
                "updateTime": "2023-12-01 19:38:40",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "更新日志",
                "menuType": 2,
                "parentId": 218,
                "sort": 3,
                "path": "/support/change-log/change-log-list",
                "component": "/support/change-log/change-log-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "HeartOutlined",
                "contextMenuId": null,
                "menuId": 152,
                "createTime": "2022-10-10 10:31:20",
                "createUserId": 44,
                "updateTime": "2023-12-01 19:38:51",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "网络安全",
        "menuType": 1,
        "parentId": 0,
        "sort": 5,
        "path": null,
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": true,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": 1,
        "webPerms": null,
        "apiPerms": null,
        "icon": "SafetyCertificateOutlined",
        "contextMenuId": null,
        "menuId": 213,
        "createTime": "2023-10-17 19:03:08",
        "createUserId": 1,
        "updateTime": "2023-12-01 19:38:00",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "登录锁定",
                "menuType": 2,
                "parentId": 213,
                "sort": 1,
                "path": "/support/login-fail",
                "component": "/support/login-fail/login-fail-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": 1,
                "webPerms": null,
                "apiPerms": null,
                "icon": "LockOutlined",
                "contextMenuId": null,
                "menuId": 214,
                "createTime": "2023-10-17 19:04:24",
                "createUserId": 1,
                "updateTime": "2023-10-17 19:04:24",
                "updateUserId": null,
                "children": []
            },
            {
                "menuName": "登录日志",
                "menuType": 2,
                "parentId": 213,
                "sort": 2,
                "path": "/support/login-log/login-log-list",
                "component": "/support/login-log/login-log-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "LoginOutlined",
                "contextMenuId": null,
                "menuId": 143,
                "createTime": "2022-06-28 15:01:38",
                "createUserId": 1,
                "updateTime": "2023-10-17 19:04:34",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "接口加解密",
                "menuType": 2,
                "parentId": 213,
                "sort": 3,
                "path": "/support/api-encrypt",
                "component": "/support/api-encrypt/api-encrypt-index.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": 1,
                "webPerms": null,
                "apiPerms": null,
                "icon": "CodepenCircleOutlined",
                "contextMenuId": null,
                "menuId": 215,
                "createTime": "2023-10-24 11:49:28",
                "createUserId": 1,
                "updateTime": "2023-10-25 16:28:18",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "系统设置",
        "menuType": 1,
        "parentId": 0,
        "sort": 6,
        "path": "/setting",
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "SettingOutlined",
        "contextMenuId": null,
        "menuId": 50,
        "createTime": "2021-08-13 16:41:33",
        "createUserId": 1,
        "updateTime": "2023-12-01 19:38:03",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "菜单管理",
                "menuType": 2,
                "parentId": 50,
                "sort": 1,
                "path": "/menu/list",
                "component": "/system/menu/menu-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "CopyOutlined",
                "contextMenuId": null,
                "menuId": 26,
                "createTime": "2021-08-09 15:04:35",
                "createUserId": 2,
                "updateTime": "2023-12-01 19:39:03",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "参数配置",
                "menuType": 2,
                "parentId": 50,
                "sort": 3,
                "path": "/config/config-list",
                "component": "/support/config/config-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "AntDesignOutlined",
                "contextMenuId": null,
                "menuId": 109,
                "createTime": "2022-05-27 13:34:41",
                "createUserId": 1,
                "updateTime": "2022-06-23 16:24:16",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "数据字典",
                "menuType": 2,
                "parentId": 50,
                "sort": 4,
                "path": "/setting/dict",
                "component": "/support/dict/index.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "BarcodeOutlined",
                "contextMenuId": null,
                "menuId": 110,
                "createTime": "2022-05-27 17:53:00",
                "createUserId": 1,
                "updateTime": "2022-05-27 18:09:14",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "单号管理",
                "menuType": 2,
                "parentId": 50,
                "sort": 6,
                "path": "/support/serial-number/serial-number-list",
                "component": "/support/serial-number/serial-number-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "NumberOutlined",
                "contextMenuId": null,
                "menuId": 130,
                "createTime": "2022-06-24 14:45:22",
                "createUserId": 1,
                "updateTime": "2022-06-28 16:23:41",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "缓存管理",
                "menuType": 2,
                "parentId": 50,
                "sort": 11,
                "path": "/support/cache/cache-list",
                "component": "/support/cache/cache-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "BorderInnerOutlined",
                "contextMenuId": null,
                "menuId": 133,
                "createTime": "2022-06-24 18:52:25",
                "createUserId": 1,
                "updateTime": "2023-12-01 19:39:13",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "Reload",
                "menuType": 2,
                "parentId": 50,
                "sort": 12,
                "path": "/hook",
                "component": "/support/reload/reload-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "ReloadOutlined",
                "contextMenuId": null,
                "menuId": 117,
                "createTime": "2022-06-20 10:16:49",
                "createUserId": 1,
                "updateTime": "2023-12-01 19:39:17",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "文件管理",
                "menuType": 2,
                "parentId": 50,
                "sort": 20,
                "path": "/support/file/file-list",
                "component": "/support/file/file-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "FolderOpenOutlined",
                "contextMenuId": null,
                "menuId": 193,
                "createTime": "2022-10-21 11:26:11",
                "createUserId": 1,
                "updateTime": "2022-10-22 11:29:22",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "监控服务",
        "menuType": 1,
        "parentId": 0,
        "sort": 100,
        "path": "/monitor",
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "BarChartOutlined",
        "contextMenuId": null,
        "menuId": 111,
        "createTime": "2022-06-17 11:13:23",
        "createUserId": 1,
        "updateTime": "2023-11-28 17:43:56",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "心跳监控",
                "menuType": 2,
                "parentId": 111,
                "sort": 1,
                "path": "/support/heart-beat/heart-beat-list",
                "component": "/support/heart-beat/heart-beat-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": 1,
                "webPerms": null,
                "apiPerms": null,
                "icon": "FallOutlined",
                "contextMenuId": null,
                "menuId": 206,
                "createTime": "2022-10-22 10:47:03",
                "createUserId": 1,
                "updateTime": "2022-10-22 18:32:52",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "请求监控",
                "menuType": 2,
                "parentId": 111,
                "sort": 3,
                "path": "/support/operate-log/operate-log-list",
                "component": "/support/operate-log/operate-log-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "VideoCameraOutlined",
                "contextMenuId": null,
                "menuId": 81,
                "createTime": "2022-05-20 12:37:24",
                "createUserId": 1,
                "updateTime": "2022-10-22 18:33:10",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "数据库监控",
                "menuType": 2,
                "parentId": 111,
                "sort": 4,
                "path": "/support/druid/index",
                "component": null,
                "frameFlag": true,
                "frameUrl": "https://preview.smartadmin.vip/smart-admin-api/druid/index.html",
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "ConsoleSqlOutlined",
                "contextMenuId": null,
                "menuId": 122,
                "createTime": "2022-06-20 14:49:33",
                "createUserId": 1,
                "updateTime": "2024-01-15 15:18:55",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "代码生成",
        "menuType": 2,
        "parentId": 0,
        "sort": 600,
        "path": "/support/code-generator",
        "component": "/support/code-generator/code-generator-list.vue",
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "CoffeeOutlined",
        "contextMenuId": null,
        "menuId": 151,
        "createTime": "2022-09-21 18:25:05",
        "createUserId": 1,
        "updateTime": "2022-10-22 11:27:58",
        "updateUserId": 1,
        "children": []
    }
]
// -------------------------------------------
const tableData = ref([]);
const tableLoading = ref(false);
const total = ref(0);
async function ajaxQuery() {
    try {
      tableLoading.value = true;
      // let responseModel = await tool.deptList({});
      tableData.value = [
    {
        "menuName": "OA系统",
        "menuType": 1,
        "parentId": 0,
        "sort": 1,
        "path": null,
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "BankOutlined",
        "contextMenuId": null,
        "menuId": 138,
        "createTime": "2022-06-24 20:09:18",
        "createUserId": 1,
        "updateTime": "2022-10-22 18:30:15",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "企业详情",
                "menuType": 2,
                "parentId": 138,
                "sort": null,
                "path": "/oa/enterprise/enterprise-detail",
                "component": "/business/oa/enterprise/enterprise-detail.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": false,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": null,
                "contextMenuId": null,
                "menuId": 145,
                "createTime": "2022-09-14 18:52:52",
                "createUserId": 1,
                "updateTime": "2022-11-22 10:39:07",
                "updateUserId": 1,
            },
            {
                "menuName": "企业信息",
                "menuType": 2,
                "parentId": 138,
                "sort": 1,
                "path": "/oa/enterprise/enterprise-list",
                "component": "/business/oa/enterprise/enterprise-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "ShopOutlined",
                "contextMenuId": null,
                "menuId": 144,
                "createTime": "2022-09-14 17:00:07",
                "createUserId": 1,
                "updateTime": "2023-12-04 13:42:19",
                "updateUserId": 1,
            },
            {
                "menuName": "通知公告",
                "menuType": 2,
                "parentId": 138,
                "sort": 2,
                "path": "/oa/notice/notice-list",
                "component": "/business/oa/notice/notice-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "SoundOutlined",
                "contextMenuId": null,
                "menuId": 132,
                "createTime": "2022-06-24 18:23:09",
                "createUserId": 1,
                "updateTime": "2023-12-04 13:42:23",
                "updateUserId": 1,
                "children": [
                    {
                        "menuName": "我的通知",
                        "menuType": 2,
                        "parentId": 132,
                        "sort": null,
                        "path": "/oa/notice/notice-employee-list",
                        "component": "/business/oa/notice/notice-employee-list.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": false,
                        "visibleFlag": false,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": null,
                        "contextMenuId": null,
                        "menuId": 149,
                        "createTime": "2022-09-14 20:29:41",
                        "createUserId": 1,
                        "updateTime": "2022-09-14 20:31:23",
                        "updateUserId": 1,
                        "children": []
                    },
                    {
                        "menuName": "我的通知公告详情",
                        "menuType": 2,
                        "parentId": 132,
                        "sort": null,
                        "path": "/oa/notice/notice-employee-detail",
                        "component": "/business/oa/notice/notice-employee-detail.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": false,
                        "visibleFlag": false,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": null,
                        "contextMenuId": null,
                        "menuId": 150,
                        "createTime": "2022-09-14 20:30:25",
                        "createUserId": 1,
                        "updateTime": "2022-09-14 20:31:38",
                        "updateUserId": 1,
                        "children": []
                    },
                    {
                        "menuName": "公告详情",
                        "menuType": 2,
                        "parentId": 132,
                        "sort": null,
                        "path": "/oa/notice/notice-detail",
                        "component": "/business/oa/notice/notice-detail.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": false,
                        "visibleFlag": false,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": null,
                        "contextMenuId": null,
                        "menuId": 142,
                        "createTime": "2022-06-25 16:38:47",
                        "createUserId": 1,
                        "updateTime": "2022-09-14 19:46:17",
                        "updateUserId": 1,
                        "children": []
                    }
                ]
            }
        ]
    },
    {
        "menuName": "进销存系统",
        "menuType": 1,
        "parentId": 0,
        "sort": 2,
        "path": null,
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "AccountBookOutlined",
        "contextMenuId": null,
        "menuId": 137,
        "createTime": "2022-06-24 20:07:20",
        "createUserId": 1,
        "updateTime": "2022-10-22 18:30:19",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "商品管理",
                "menuType": 1,
                "parentId": 137,
                "sort": 10,
                "path": "/goods",
                "component": null,
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "BarcodeOutlined",
                "contextMenuId": null,
                "menuId": 48,
                "createTime": "2021-08-12 18:02:59",
                "createUserId": 1,
                "updateTime": "2022-06-24 20:07:35",
                "updateUserId": 1,
                "children": [
                    {
                        "menuName": "商品管理",
                        "menuType": 2,
                        "parentId": 48,
                        "sort": 1,
                        "path": "/erp/goods/list",
                        "component": "/business/erp/goods/goods-list.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": true,
                        "visibleFlag": true,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": "AliwangwangOutlined",
                        "contextMenuId": null,
                        "menuId": 47,
                        "createTime": "2021-08-12 17:58:39",
                        "createUserId": 1,
                        "updateTime": "2023-12-01 19:33:08",
                        "updateUserId": 1,
                        "children": []
                    },
                    {
                        "menuName": "商品分类",
                        "menuType": 2,
                        "parentId": 48,
                        "sort": 2,
                        "path": "/erp/catalog/goods",
                        "component": "/business/erp/catalog/goods-catalog.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": true,
                        "visibleFlag": true,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": "ApartmentOutlined",
                        "contextMenuId": null,
                        "menuId": 78,
                        "createTime": "2022-05-18 23:34:14",
                        "createUserId": 1,
                        "updateTime": "2023-12-01 19:33:13",
                        "updateUserId": 1,
                        "children": []
                    },
                    {
                        "menuName": "自定义分组",
                        "menuType": 2,
                        "parentId": 48,
                        "sort": 3,
                        "path": "/erp/catalog/custom",
                        "component": "/business/erp/catalog/custom-catalog.vue",
                        "frameFlag": false,
                        "frameUrl": null,
                        "cacheFlag": false,
                        "visibleFlag": true,
                        "disabledFlag": false,
                        "permsType": null,
                        "webPerms": null,
                        "apiPerms": null,
                        "icon": "AppstoreAddOutlined",
                        "contextMenuId": null,
                        "menuId": 79,
                        "createTime": "2022-05-18 23:37:53",
                        "createUserId": 1,
                        "updateTime": "2023-12-01 19:33:16",
                        "updateUserId": 1,
                        "children": []
                    }
                ]
            }
        ]
    },
    {
        "menuName": "部门员工",
        "menuType": 1,
        "parentId": 0,
        "sort": 3,
        "path": "/organization",
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "UserSwitchOutlined",
        "contextMenuId": null,
        "menuId": 45,
        "createTime": "2021-08-12 16:13:27",
        "createUserId": 1,
        "updateTime": "2023-11-28 17:42:25",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "部门员工",
                "menuType": 2,
                "parentId": 45,
                "sort": 1,
                "path": "/employee/department",
                "component": "/system/employee/department/index.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "AuditOutlined",
                "contextMenuId": null,
                "menuId": 46,
                "createTime": "2021-08-12 16:21:50",
                "createUserId": 1,
                "updateTime": "2022-06-23 16:19:54",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "角色管理",
                "menuType": 2,
                "parentId": 45,
                "sort": 2,
                "path": "/employee/role",
                "component": "/system/employee/role/index.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "SlidersOutlined",
                "contextMenuId": null,
                "menuId": 76,
                "createTime": "2021-08-26 10:31:00",
                "createUserId": 1,
                "updateTime": "2022-06-23 16:21:06",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "文档中心",
        "menuType": 1,
        "parentId": 0,
        "sort": 4,
        "path": null,
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": true,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": 1,
        "webPerms": null,
        "apiPerms": null,
        "icon": "FileSearchOutlined",
        "contextMenuId": null,
        "menuId": 218,
        "createTime": "2023-12-01 19:37:28",
        "createUserId": 1,
        "updateTime": "2023-12-01 19:37:51",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "帮助文档",
                "menuType": 2,
                "parentId": 218,
                "sort": 1,
                "path": "/help-doc/help-doc-manage-list",
                "component": "/support/help-doc/management/help-doc-manage-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "FolderViewOutlined",
                "contextMenuId": null,
                "menuId": 147,
                "createTime": "2022-09-14 19:59:01",
                "createUserId": 1,
                "updateTime": "2023-12-01 19:38:23",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "意见反馈",
                "menuType": 2,
                "parentId": 218,
                "sort": 2,
                "path": "/feedback/feedback-list",
                "component": "/support/feedback/feedback-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "CoffeeOutlined",
                "contextMenuId": null,
                "menuId": 148,
                "createTime": "2022-09-14 19:59:52",
                "createUserId": 1,
                "updateTime": "2023-12-01 19:38:40",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "更新日志",
                "menuType": 2,
                "parentId": 218,
                "sort": 3,
                "path": "/support/change-log/change-log-list",
                "component": "/support/change-log/change-log-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "HeartOutlined",
                "contextMenuId": null,
                "menuId": 152,
                "createTime": "2022-10-10 10:31:20",
                "createUserId": 44,
                "updateTime": "2023-12-01 19:38:51",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "网络安全",
        "menuType": 1,
        "parentId": 0,
        "sort": 5,
        "path": null,
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": true,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": 1,
        "webPerms": null,
        "apiPerms": null,
        "icon": "SafetyCertificateOutlined",
        "contextMenuId": null,
        "menuId": 213,
        "createTime": "2023-10-17 19:03:08",
        "createUserId": 1,
        "updateTime": "2023-12-01 19:38:00",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "登录锁定",
                "menuType": 2,
                "parentId": 213,
                "sort": 1,
                "path": "/support/login-fail",
                "component": "/support/login-fail/login-fail-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": 1,
                "webPerms": null,
                "apiPerms": null,
                "icon": "LockOutlined",
                "contextMenuId": null,
                "menuId": 214,
                "createTime": "2023-10-17 19:04:24",
                "createUserId": 1,
                "updateTime": "2023-10-17 19:04:24",
                "updateUserId": null,
                "children": []
            },
            {
                "menuName": "登录日志",
                "menuType": 2,
                "parentId": 213,
                "sort": 2,
                "path": "/support/login-log/login-log-list",
                "component": "/support/login-log/login-log-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "LoginOutlined",
                "contextMenuId": null,
                "menuId": 143,
                "createTime": "2022-06-28 15:01:38",
                "createUserId": 1,
                "updateTime": "2023-10-17 19:04:34",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "接口加解密",
                "menuType": 2,
                "parentId": 213,
                "sort": 3,
                "path": "/support/api-encrypt",
                "component": "/support/api-encrypt/api-encrypt-index.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": 1,
                "webPerms": null,
                "apiPerms": null,
                "icon": "CodepenCircleOutlined",
                "contextMenuId": null,
                "menuId": 215,
                "createTime": "2023-10-24 11:49:28",
                "createUserId": 1,
                "updateTime": "2023-10-25 16:28:18",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "系统设置",
        "menuType": 1,
        "parentId": 0,
        "sort": 6,
        "path": "/setting",
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "SettingOutlined",
        "contextMenuId": null,
        "menuId": 50,
        "createTime": "2021-08-13 16:41:33",
        "createUserId": 1,
        "updateTime": "2023-12-01 19:38:03",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "菜单管理",
                "menuType": 2,
                "parentId": 50,
                "sort": 1,
                "path": "/menu/list",
                "component": "/system/menu/menu-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "CopyOutlined",
                "contextMenuId": null,
                "menuId": 26,
                "createTime": "2021-08-09 15:04:35",
                "createUserId": 2,
                "updateTime": "2023-12-01 19:39:03",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "参数配置",
                "menuType": 2,
                "parentId": 50,
                "sort": 3,
                "path": "/config/config-list",
                "component": "/support/config/config-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "AntDesignOutlined",
                "contextMenuId": null,
                "menuId": 109,
                "createTime": "2022-05-27 13:34:41",
                "createUserId": 1,
                "updateTime": "2022-06-23 16:24:16",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "数据字典",
                "menuType": 2,
                "parentId": 50,
                "sort": 4,
                "path": "/setting/dict",
                "component": "/support/dict/index.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "BarcodeOutlined",
                "contextMenuId": null,
                "menuId": 110,
                "createTime": "2022-05-27 17:53:00",
                "createUserId": 1,
                "updateTime": "2022-05-27 18:09:14",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "单号管理",
                "menuType": 2,
                "parentId": 50,
                "sort": 6,
                "path": "/support/serial-number/serial-number-list",
                "component": "/support/serial-number/serial-number-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "NumberOutlined",
                "contextMenuId": null,
                "menuId": 130,
                "createTime": "2022-06-24 14:45:22",
                "createUserId": 1,
                "updateTime": "2022-06-28 16:23:41",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "缓存管理",
                "menuType": 2,
                "parentId": 50,
                "sort": 11,
                "path": "/support/cache/cache-list",
                "component": "/support/cache/cache-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "BorderInnerOutlined",
                "contextMenuId": null,
                "menuId": 133,
                "createTime": "2022-06-24 18:52:25",
                "createUserId": 1,
                "updateTime": "2023-12-01 19:39:13",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "Reload",
                "menuType": 2,
                "parentId": 50,
                "sort": 12,
                "path": "/hook",
                "component": "/support/reload/reload-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "ReloadOutlined",
                "contextMenuId": null,
                "menuId": 117,
                "createTime": "2022-06-20 10:16:49",
                "createUserId": 1,
                "updateTime": "2023-12-01 19:39:17",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "文件管理",
                "menuType": 2,
                "parentId": 50,
                "sort": 20,
                "path": "/support/file/file-list",
                "component": "/support/file/file-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "FolderOpenOutlined",
                "contextMenuId": null,
                "menuId": 193,
                "createTime": "2022-10-21 11:26:11",
                "createUserId": 1,
                "updateTime": "2022-10-22 11:29:22",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "监控服务",
        "menuType": 1,
        "parentId": 0,
        "sort": 100,
        "path": "/monitor",
        "component": null,
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "BarChartOutlined",
        "contextMenuId": null,
        "menuId": 111,
        "createTime": "2022-06-17 11:13:23",
        "createUserId": 1,
        "updateTime": "2023-11-28 17:43:56",
        "updateUserId": 1,
        "children": [
            {
                "menuName": "心跳监控",
                "menuType": 2,
                "parentId": 111,
                "sort": 1,
                "path": "/support/heart-beat/heart-beat-list",
                "component": "/support/heart-beat/heart-beat-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": 1,
                "webPerms": null,
                "apiPerms": null,
                "icon": "FallOutlined",
                "contextMenuId": null,
                "menuId": 206,
                "createTime": "2022-10-22 10:47:03",
                "createUserId": 1,
                "updateTime": "2022-10-22 18:32:52",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "请求监控",
                "menuType": 2,
                "parentId": 111,
                "sort": 3,
                "path": "/support/operate-log/operate-log-list",
                "component": "/support/operate-log/operate-log-list.vue",
                "frameFlag": false,
                "frameUrl": null,
                "cacheFlag": false,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "VideoCameraOutlined",
                "contextMenuId": null,
                "menuId": 81,
                "createTime": "2022-05-20 12:37:24",
                "createUserId": 1,
                "updateTime": "2022-10-22 18:33:10",
                "updateUserId": 1,
                "children": []
            },
            {
                "menuName": "数据库监控",
                "menuType": 2,
                "parentId": 111,
                "sort": 4,
                "path": "/support/druid/index",
                "component": null,
                "frameFlag": true,
                "frameUrl": "https://preview.smartadmin.vip/smart-admin-api/druid/index.html",
                "cacheFlag": true,
                "visibleFlag": true,
                "disabledFlag": false,
                "permsType": null,
                "webPerms": null,
                "apiPerms": null,
                "icon": "ConsoleSqlOutlined",
                "contextMenuId": null,
                "menuId": 122,
                "createTime": "2022-06-20 14:49:33",
                "createUserId": 1,
                "updateTime": "2024-01-15 15:18:55",
                "updateUserId": 1,
                "children": []
            }
        ]
    },
    {
        "menuName": "代码生成",
        "menuType": 2,
        "parentId": 0,
        "sort": 600,
        "path": "/support/code-generator",
        "component": "/support/code-generator/code-generator-list.vue",
        "frameFlag": false,
        "frameUrl": null,
        "cacheFlag": false,
        "visibleFlag": true,
        "disabledFlag": false,
        "permsType": null,
        "webPerms": null,
        "apiPerms": null,
        "icon": "CoffeeOutlined",
        "contextMenuId": null,
        "menuId": 151,
        "createTime": "2022-09-21 18:25:05",
        "createUserId": 1,
        "updateTime": "2022-10-22 11:27:58",
        "updateUserId": 1,
        "children": []
    }
]
    } catch (e) {
      console.log(e)
    } finally {
      tableLoading.value = false;
    }
}
async function save(){
    if(form.departmentName == ''){
		message.error('请输入部门名称！')
		return
	}
    try {
		btnStatus.value = true
		await tool.deptEdit(form);
		modalVisible.value = false
		ajaxQuery()
	} catch (e:any) {
		message.error(e.message)
	} finally {
		btnStatus.value = false
	}
}

onMounted(()=>{
	ajaxQuery()
})
</script>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
    name: 'systemMenu',
})
</script>
<style>

</style>